package com.foreknow.demo3;

import java.util.Scanner;

public class Zy0730 {
        public static void main(String[] args) {
            Scanner input = new Scanner(System.in);
            Scanner scanner = new Scanner(System.in);

            System.out.print("请输入您的年龄：");
            int age = scanner.nextInt();

            System.out.print("请输入您的职业（学生/退休人员/军人/其他）：");
            String job = scanner.next();
            if (age > 0) {
                if ((age < 18 && "学生".equals(job)) ||
                        (age >= 60 && "退休人员".equals(job)) ||
                        (age >= 18 && "军人".equals(job))) {
                    System.out.println("您享受优惠政策！");
                } else {
                    System.out.println("您不享受优惠政策。");
                }
            } else {
                System.out.println("年龄输入无效，请输入大于0的年龄。");
            }

            scanner.close();
        }
    }

